﻿using MT.DAL.Infrastructure;
using MT.Models.Entity;
using System.Threading.Tasks;

namespace MT.DAL.Dto.UserCenter
{
    public class UserInstitutionDto : RepositoryBase<UserInstitution>
    {
        public UserInstitutionDto(AppDbContext dbContext) : base(dbContext)
        {
        }

        public async Task<UserInstitution> GetByUserIdAsync(int userId)
        {
            return await this.GetAsync(s => s.UserId == userId);
        }

        //public async Task<int> GetByUserIdAsync(int institutionId)
        //{
        //    return await this.GetAsync(s => s.InstitutionId == institutionId);
        //}
    }
}
